#pragma once

#include "SerialPort.h"
#include "opencv2/opencv.hpp"

class Protocol {
public:
    explicit Protocol(SerialPort& serial_port);
    ~Protocol();
    void sendTarget(cv::Point3f& target);
    void receiveData();

private:
    SerialPort& serial_port_;
};

enum class EnemyColor : uchar { RED,
    BLUE };
enum class State : uchar { ARMOR_STATE,
    RUNE_STATE,RUNE_BIG};

struct Target {
    float yaw;
    float pitch;
    float distance;
};

struct McuData {
    EnemyColor enemy_color;
    State state;
};

extern McuData mcu_data;
